﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OgonPhonesXML.Aastra.Serializer
{
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class AastraIPPhoneDirectory
    {
        private string titleField;

        

        private AastraIPPhoneDirectoryMenuItem[] menuItemField;
        private List<AastraIPPhoneDirectoryMenuItem> listMenuItem = new List<AastraIPPhoneDirectoryMenuItem>();

        private softKeyType[] softKeyField;
        private List<softKeyType> listSoftKey = new List<softKeyType>();

        private iconListTypeIcon[] iconListField;
        private List<iconListTypeIcon> listIconList = new List<iconListTypeIcon>();

        private string destroyOnExitField;

        private string beepField;

        private string lockInField;

        private string timeoutField;

        private string nextField;

        private string previousField;

        private string cancelActionField;

        public AastraIPPhoneDirectory()
        {
            this.destroyOnExitField = "no";
            this.beepField = "no";
            this.lockInField = "no";
            this.timeoutField = "45";
        }
        public void addDirecotryItem(string prompt,string uri)
        {
            AastraIPPhoneDirectoryMenuItem psvMenuItem = new AastraIPPhoneDirectoryMenuItem();
            psvMenuItem.Prompt = prompt;
            psvMenuItem.URI = uri;
            listMenuItem.Add(psvMenuItem);
        }
        public void addDirecotryItem(string prompt, string uri,string icon)
        {
            AastraIPPhoneDirectoryMenuItem psvMenuItem = new AastraIPPhoneDirectoryMenuItem();
            psvMenuItem.Prompt = prompt;
            psvMenuItem.URI = uri;
            psvMenuItem.icon = icon;
            listMenuItem.Add(psvMenuItem);
        }
        public void addSoftKey(string index, string label, string uri)
        {
            softKeyType psvSoftKey = new softKeyType();
            psvSoftKey.index = index;
            psvSoftKey.Label = label;
            
            psvSoftKey.URI = uri;
            listSoftKey.Add(psvSoftKey);
        }
        public void addSoftKey(string index, string label, string uri,string icon)
        {
            softKeyType psvSoftKey = new softKeyType();
            psvSoftKey.index = index;
            psvSoftKey.Label = label;
            psvSoftKey.icon = icon;
            psvSoftKey.URI = uri;
            listSoftKey.Add(psvSoftKey);
        }
        public void addIconList(string index, string text)
        {
            iconListTypeIcon psvIconType = new iconListTypeIcon();
            psvIconType.index = index;
            String[] finalString = { text };
            psvIconType.Text = finalString;
            listIconList.Add(psvIconType);
        }
        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Title
        {
            get
            {
                return this.titleField;
            }
            set
            {
                this.titleField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("MenuItem", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public AastraIPPhoneDirectoryMenuItem[] MenuItem
        {
            get
            {
                this.menuItemField = listMenuItem.ToArray();
                return this.menuItemField;
            }
            set
            {
                this.menuItemField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("SoftKey", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public softKeyType[] SoftKey
        {
            get
            {
                this.softKeyField = listSoftKey.ToArray();
                return this.softKeyField;
            }
            set
            {
                this.softKeyField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        [System.Xml.Serialization.XmlArrayItemAttribute("Icon", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
        public iconListTypeIcon[] IconList
        {
            get
            {
                this.iconListField = listIconList.ToArray();
                return this.iconListField;
            }
            set
            {
                this.iconListField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string destroyOnExit
        {
            get
            {
                return this.destroyOnExitField;
            }
            set
            {
                this.destroyOnExitField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string Beep
        {
            get
            {
                return this.beepField;
            }
            set
            {
                this.beepField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string LockIn
        {
            get
            {
                return this.lockInField;
            }
            set
            {
                this.lockInField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "integer")]
        [System.ComponentModel.DefaultValueAttribute("45")]
        public string Timeout
        {
            get
            {
                return this.timeoutField;
            }
            set
            {
                this.timeoutField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string next
        {
            get
            {
                return this.nextField;
            }
            set
            {
                this.nextField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string previous
        {
            get
            {
                return this.previousField;
            }
            set
            {
                this.previousField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string cancelAction
        {
            get
            {
                return this.cancelActionField;
            }
            set
            {
                this.cancelActionField = value;
            }
        }
    }
}
